[Discover] [Metrics] Re-introduce metrics suggested queries#251376
[Discover] [Metrics] Re-introduce metrics suggested queries#251376justinkambic merged 19 commits intoelastic:mainfrom
Conversation
- Introduced to determine the solution ID for extensions, defaulting to 'oblt' for the 'discover' app. - Updated the ESQL editor and menu popover components to use the new variable for fetching recommended queries. - Added new recommended queries for metrics in the observability plugin. This change improves the handling of solution IDs across components, ensuring consistent behavior when fetching ESQL extensions.
|
Hi @justinkambic , it looks good to me, the only thing that I would ask is if changing the text could be an option (like in the Acceptance criteria). If it can generate some confusion, let's leave it as is and it is all good but if we can change it that would be great. |
- Changed the name and description of the All
…ry for metrics - Removed the deprecated logic for determining the solution ID for extensions in the ESQL editor. - Updated the ESQL editor to use the active solution ID directly. - Introduced a new recommended query template for searching all metrics, enhancing the usability of the ESQL language features.
…ibana into 251289/select-all-metrics
…ibana into 251289/select-all-metrics
|
Pinging @elastic/obs-exploration-team (Team:obs-exploration) |
stratoula
left a comment
There was a problem hiding this comment.
Let's remove the code from the recommended queries. They are not implemented to work like that
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
|
| 'Counts error occurrences by host name and shows the top 50 hosts with the most errors', | ||
| }), | ||
| }, | ||
| { |
There was a problem hiding this comment.
The TS command and the metrics experience is available in all solutions (oblt, security, search).
However, the recommended Search all metrics command is only available for observability solution view.
Could we please enable it for the other solutions as well to align with the previous setup?
There was a problem hiding this comment.
Check 684e1ab, it should behave the same in all three solution views now.
There was a problem hiding this comment.
@kpatticha when you have a chance this is ready for review again, just verified CI is good
- Moved the Search
|
Starting backport for target branches: 9.3 https://github.com/elastic/kibana/actions/runs/22232360959 |
…251376) ## Summary Resolves elastic#251289. ~Re-introduces the "all metrics" ES|QL recommendation that was previously removed.~ Update: per the ticket, we have changed the copy to read "Search all metrics". The screenshots are the same but the copy has been [updated](https://github.com/elastic/kibana/pull/251376/changes#diff-c9b2af3b7c484565768216fd866cd80df9df1e3b1c919994c1bbbbb41be93a96R74). ## Demonstration of change ### Recommends when clicking empty editor  ### Recommends when user types "metrics"  ### ~Includes the recommendation in ES|QL help menu~ **redacted** We are actually blocked on providing this functionality for the time being. See the discussion on elastic#237425 for further information. ## Testing the PR Load some metrics data. You can do this using [simian-forge](https://github.com/simianhacker/simian-forge). Pull the code, `npm ci && npm run build`, and you can index data with a command like: ```bash ./forge --backfill now-1h --interval 10s --count 100 --dataset hosts --purge --elasticsearch-url {ES_URL} --elasticsearch-api-key {CREATE_AN_API_KEY} ``` Navigate to Discover and test the UI. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit d845e03)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…51376) (#254261) # Backport This will backport the following commits from `main` to `9.3`: - [[Discover] [Metrics] Re-introduce metrics suggested queries (#251376)](#251376) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Justin Kambic","email":"jk@elastic.co"},"sourceCommit":{"committedDate":"2026-02-20T16:35:01Z","message":"[Discover] [Metrics] Re-introduce metrics suggested queries (#251376)\n\n## Summary\n\nResolves #251289.\n\n~Re-introduces the \"all metrics\" ES|QL recommendation that was\npreviously removed.~ Update: per the ticket, we have changed the copy to\nread \"Search all metrics\". The screenshots are the same but the copy has\nbeen\n[updated](https://github.com/elastic/kibana/pull/251376/changes#diff-c9b2af3b7c484565768216fd866cd80df9df1e3b1c919994c1bbbbb41be93a96R74).\n\n## Demonstration of change\n\n### Recommends when clicking empty editor\n\n\n\n\n### Recommends when user types \"metrics\"\n\n\n\n\n### ~Includes the recommendation in ES|QL help menu~\n\n**redacted**\n\nWe are actually blocked on providing this functionality for the time\nbeing. See the discussion on\nhttps://github.com//issues/237425 for further information.\n\n## Testing the PR\n\nLoad some metrics data. You can do this using\n[simian-forge](https://github.com/simianhacker/simian-forge). Pull the\ncode, `npm ci && npm run build`, and you can index data with a command\nlike:\n\n```bash\n./forge --backfill now-1h --interval 10s --count 100 --dataset hosts --purge --elasticsearch-url {ES_URL} --elasticsearch-api-key {CREATE_AN_API_KEY}\n```\n\nNavigate to Discover and test the UI.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"d845e0376b9827cd6f4e1e7ff1efffbc092eefe1","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","backport:version","Feature:Metrics in Discover","Team:obs-exploration","v9.4.0","Team:obs-ux-management","v9.3.1"],"title":"[Discover] [Metrics] Re-introduce metrics suggested queries","number":251376,"url":"https://github.com/elastic/kibana/pull/251376","mergeCommit":{"message":"[Discover] [Metrics] Re-introduce metrics suggested queries (#251376)\n\n## Summary\n\nResolves #251289.\n\n~Re-introduces the \"all metrics\" ES|QL recommendation that was\npreviously removed.~ Update: per the ticket, we have changed the copy to\nread \"Search all metrics\". The screenshots are the same but the copy has\nbeen\n[updated](https://github.com/elastic/kibana/pull/251376/changes#diff-c9b2af3b7c484565768216fd866cd80df9df1e3b1c919994c1bbbbb41be93a96R74).\n\n## Demonstration of change\n\n### Recommends when clicking empty editor\n\n\n\n\n### Recommends when user types \"metrics\"\n\n\n\n\n### ~Includes the recommendation in ES|QL help menu~\n\n**redacted**\n\nWe are actually blocked on providing this functionality for the time\nbeing. See the discussion on\nhttps://github.com//issues/237425 for further information.\n\n## Testing the PR\n\nLoad some metrics data. You can do this using\n[simian-forge](https://github.com/simianhacker/simian-forge). Pull the\ncode, `npm ci && npm run build`, and you can index data with a command\nlike:\n\n```bash\n./forge --backfill now-1h --interval 10s --count 100 --dataset hosts --purge --elasticsearch-url {ES_URL} --elasticsearch-api-key {CREATE_AN_API_KEY}\n```\n\nNavigate to Discover and test the UI.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"d845e0376b9827cd6f4e1e7ff1efffbc092eefe1"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251376","number":251376,"mergeCommit":{"message":"[Discover] [Metrics] Re-introduce metrics suggested queries (#251376)\n\n## Summary\n\nResolves #251289.\n\n~Re-introduces the \"all metrics\" ES|QL recommendation that was\npreviously removed.~ Update: per the ticket, we have changed the copy to\nread \"Search all metrics\". The screenshots are the same but the copy has\nbeen\n[updated](https://github.com/elastic/kibana/pull/251376/changes#diff-c9b2af3b7c484565768216fd866cd80df9df1e3b1c919994c1bbbbb41be93a96R74).\n\n## Demonstration of change\n\n### Recommends when clicking empty editor\n\n\n\n\n### Recommends when user types \"metrics\"\n\n\n\n\n### ~Includes the recommendation in ES|QL help menu~\n\n**redacted**\n\nWe are actually blocked on providing this functionality for the time\nbeing. See the discussion on\nhttps://github.com//issues/237425 for further information.\n\n## Testing the PR\n\nLoad some metrics data. You can do this using\n[simian-forge](https://github.com/simianhacker/simian-forge). Pull the\ncode, `npm ci && npm run build`, and you can index data with a command\nlike:\n\n```bash\n./forge --backfill now-1h --interval 10s --count 100 --dataset hosts --purge --elasticsearch-url {ES_URL} --elasticsearch-api-key {CREATE_AN_API_KEY}\n```\n\nNavigate to Discover and test the UI.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"d845e0376b9827cd6f4e1e7ff1efffbc092eefe1"}},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Justin Kambic <jk@elastic.co>
Summary
Resolves #251289.
Re-introduces the "all metrics" ES|QL recommendation that was previously removed.Update: per the ticket, we have changed the copy to read "Search all metrics". The screenshots are the same but the copy has been updated.Demonstration of change
Recommends when clicking empty editor
Recommends when user types "metrics"
Includes the recommendation in ES|QL help menuredacted
We are actually blocked on providing this functionality for the time being. See the discussion on #237425 for further information.
Testing the PR
Load some metrics data. You can do this using simian-forge. Pull the code,
npm ci && npm run build, and you can index data with a command like:./forge --backfill now-1h --interval 10s --count 100 --dataset hosts --purge --elasticsearch-url {ES_URL} --elasticsearch-api-key {CREATE_AN_API_KEY}Navigate to Discover and test the UI.